package com.ruoyi.epidemic.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.epidemic.domain.YqLeaveApply;
import com.ruoyi.epidemic.mapper.YqLeaveApplyMapper;
import com.ruoyi.epidemic.service.IYqLeaveApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2022-05-10
 */
@Service
public class YqLeaveApplyServiceImpl implements IYqLeaveApplyService
{
    @Autowired
    private YqLeaveApplyMapper yqLeaveApplyMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public YqLeaveApply selectYqLeaveApplyById(Long id)
    {
        return yqLeaveApplyMapper.selectYqLeaveApplyById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param yqLeaveApply 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<YqLeaveApply> selectYqLeaveApplyList(YqLeaveApply yqLeaveApply)
    {
        return yqLeaveApplyMapper.selectYqLeaveApplyList(yqLeaveApply);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param yqLeaveApply 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertYqLeaveApply(YqLeaveApply yqLeaveApply)
    {
        yqLeaveApply.setCreateTime(DateUtils.getNowDate());
        return yqLeaveApplyMapper.insertYqLeaveApply(yqLeaveApply);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param yqLeaveApply 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateYqLeaveApply(YqLeaveApply yqLeaveApply)
    {
        yqLeaveApply.setUpdateTime(DateUtils.getNowDate());
        return yqLeaveApplyMapper.updateYqLeaveApply(yqLeaveApply);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteYqLeaveApplyByIds(String ids)
    {
        return yqLeaveApplyMapper.deleteYqLeaveApplyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteYqLeaveApplyById(Long id)
    {
        return yqLeaveApplyMapper.deleteYqLeaveApplyById(id);
    }
}
